home *** CD-ROM | disk | FTP | other *** search
/ Turnbull China Bikeride / Turnbull China Bikeride - Disc 1.iso / ARGONET / PD / GAMES / WIMPGAME / MINES2.ZIP / !Mines / c / mouse < prev   
Text File  |  1995-04-30  |  2KB  |  78 lines

  1. #include "mouse.h"
  2.  
  3. void os_mouse2(int *x,int *y,int *b)
  4. {
  5.     os_t *t;
  6.     os_mouse(x,y,(bits *)b,t);
  7. }
  8.  
  9. void set_mouse_color_struct(mouse_color_struct *m,int r1,int g1,int b1,int r2,int g2,int b2,int r3,int g3,int b3)
  10. {
  11.     m->c1[0]=1;m->c1[1]=25;m->c1[2]=r1;m->c1[3]=g1;m->c1[4]=b1;
  12.     m->c2[0]=2;m->c2[1]=25;m->c2[2]=r2;m->c2[3]=g2;m->c2[4]=b2;
  13.     m->c3[0]=3;m->c3[1]=25;m->c3[2]=r3;m->c3[3]=g3;m->c3[4]=b3;
  14. }
  15.  
  16.  
  17. void get_mouse_color(mouse_color_struct *m)
  18. {
  19. /*    os_regset r;
  20.     r.r[0]=1;r.r[1]=25;os_swi(OS_ReadPalette,&r);
  21.     m->c1[0]=1;m->c1[1]=25;
  22.     m->c1[2]=(r.r[2] >>  8);
  23.     m->c1[3]=(r.r[2] >> 16);
  24.     m->c1[4]=(r.r[2] >> 24);
  25.     r.r[0]=2;r.r[1]=25;os_swi(OS_ReadPalette,&r);
  26.     m->c2[0]=2;m->c2[1]=25;
  27.     m->c2[2]=(r.r[2] >>  8);
  28.     m->c2[3]=(r.r[2] >> 16);
  29.     m->c2[4]=(r.r[2] >> 24);
  30.     r.r[0]=3;r.r[1]=25;os_swi(OS_ReadPalette,&r);
  31.     m->c3[0]=3;m->c3[1]=25;
  32.     m->c3[2]=(r.r[2] >>  8);
  33.     m->c3[3]=(r.r[2] >> 16);
  34.     m->c3[4]=(r.r[2] >> 24);   */
  35. }
  36.  
  37. void set_mouse_color(mouse_color_struct *m)
  38. {
  39. /*    os_swi2(OS_Word,12,(int)m->c1);
  40.     os_swi2(OS_Word,12,(int)m->c2);
  41.     os_swi2(OS_Word,12,(int)m->c3);  */
  42. }
  43.  
  44.  
  45. void set_mouse_box(os_box *box)
  46. {oswordpointer_bbox_block bbox ;
  47.  bbox.op = oswordpointer_OP_SET_BBOX ;
  48.  bbox.reserved[0] = 0 ;
  49.  bbox.reserved[1] = 0 ;
  50.  bbox.reserved[2] = 0 ;
  51.  bbox.x0 = box->x0 ;
  52.  bbox.y0 = box->y0 ;
  53.  bbox.x1 = box->x1 ;
  54.  bbox.y1 = box->y1 ;
  55.  oswordpointer_set_bbox(&bbox);
  56. }
  57.  
  58. void set_mouse_box_screen(void)
  59. {oswordpointer_bbox_block bbox ;
  60.  os_VDU_VAR_LIST(5) list ;
  61.  int val[5] ;
  62.  list.var[0] = 11;
  63.  list.var[1] = 12;
  64.  list.var[2] = 4;
  65.  list.var[3] = 5;
  66.  list.var[4] = -1 ;
  67.  os_read_vdu_variables((os_vdu_var_list *)&list,val);
  68.  bbox.op = oswordpointer_OP_SET_BBOX ;
  69.  bbox.reserved[0] = 0 ;
  70.  bbox.reserved[1] = 0 ;
  71.  bbox.reserved[2] = 0 ;
  72.  bbox.x0 = 0 ;
  73.  bbox.y0 = 0 ;
  74.  bbox.x1 = val[0]<<val[2] ;
  75.  bbox.y1 = val[1]<<val[3] ;
  76.  oswordpointer_set_bbox(&bbox) ;
  77. }
  78.